<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/static/component/pear/css/pear.css" />
    <script src="/static/component/layui/layui.js"></script>
    <script src="/static/component/pear/pear.js"></script>
</head>
<body>
<form class="layui-form" action="">
    <div class="layui-tab layui-tab-brief" lay-filter="demo">
        <ul class="layui-tab-title">
          <li class="layui-this">基本设置</li>
          <li>高级设置</li>
          <li>微信设置</li>
          <li>模版设置</li>
          <li>报名设置</li>
          <li>分组与属性</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        标题
                    </label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input layui-form-danger" name="title" type="text" value="{$model['title']??""}"/>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            开始时间
                        </label>
                        <div class="layui-col-sm5">
                            <input type="text" class="layui-input layui-form-danger" name="begintime" type="text" value="{$model['begintime']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            结束时间
                        </label>
                        <div class="layui-col-sm5">
                            <input type="text" class="layui-input layui-form-danger" name="stoptime" type="text" value="{$model['stoptime']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        封面图
                    </label>
                    <div class="layui-input-block">
                        {:opt_photobj("fmimage")}
                    <button class="pear-btn pear-btn-primary pear-btn-sm upload-image" type="button">
                        <i class="fa fa-image">
                        </i>
                        上传图片
                    </button>
                    <input name="fmimage" type="hidden" value="{$model['fmimage']??""}"/>
                    <div class="upload-image">
                        <span>
                        </span>
                        <img class="upload-image" src="{$model['fmimage']??""}"/>
                    </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        说明的标题
                    </label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input layui-form-danger" name="hdsmbt" type="text" value="{$model['hdsmbt']??""}"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        内容
                    </label>
                    <div class="layui-input-block">
                        <textarea id="content" name="content" type="text/plain" style="width:100%;margin-bottom:20px;">{$model['content']??""}</textarea>
                    </div>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            单选或多选
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="danxuan" value="0" title="单选" lay-filter="danxuan">
                            <input type="radio" name="danxuan" value="1" title="多选" lay-filter="danxuan">
                            <input type="hidden" name="danxuanyuan" value="{$model['danxuan']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            投票限制
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="cishu" value="0" title="每天可投">
                            <input type="radio" name="cishu" value="1" title="只投一天">
                            <input type="hidden" name="cishuyuan" value="{$model['cishu']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs3">
                        <label class="layui-form-label">
                            每天次数
                        </label>
                        <div class="layui-col-sm3">
                            <input type="text" class="layui-input layui-form-danger" name="daycishu" type="text" value="{$model['daycishu']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs3" id="div15">
                        <label class="layui-form-label">
                            同一编号
                        </label>
                        <div class="layui-col-sm3">
                            <input type="text" class="layui-input layui-form-danger" name="daypiao" type="text" value="{$model['daypiao']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs3" id="div1" style="display: none;">
                        <label class="layui-form-label">
                            最多个数
                        </label>
                        <div class="layui-col-sm3">
                            <input type="text" class="layui-input layui-form-danger" name="maxxuan" type="text" value="{$model['maxxuan']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs3" id="div2" style="display: none;">
                        <label class="layui-form-label">
                            最少个数
                        </label>
                        <div class="layui-col-sm3">
                            <input type="text" class="layui-input layui-form-danger" name="minxuan" type="text" value="{$model['minxuan']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs3">
                        <label class="layui-form-label">
                            限制IP/天
                        </label>
                        <div class="layui-col-sm3">
                            <input type="text" class="layui-input layui-form-danger" name="ipdaypiao" type="text" value="{$model['ipdaypiao']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs3">
                        <label class="layui-form-label">
                            每分钟数
                        </label>
                        <div class="layui-col-sm3">
                            <input type="text" class="layui-input layui-form-danger" name="shijian" type="text" value="{$model['shijian']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs3">
                        <label class="layui-form-label">
                            得票量
                        </label>
                        <div class="layui-col-sm3">
                            <input type="text" class="layui-input layui-form-danger" name="piaoshu" type="text" value="{$model['piaoshu']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs3">
                        <label class="layui-form-label">
                            暂停分钟数
                        </label>
                        <div class="layui-col-sm3">
                            <input type="text" class="layui-input layui-form-danger" name="fenzhongshu" type="text" value="{$model['fenzhongshu']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            投票时间
                        </label>
                        <div class="layui-col-sm5">
                            <input type="text" class="layui-input layui-form-danger" name="toutime" type="text" value="{$model['toutime']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            暂停时间
                        </label>
                        <div class="layui-col-sm5">
                            <input type="text" class="layui-input layui-form-danger" name="notoutime" type="text" value="{$model['notoutime']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs8">
                        <label class="layui-form-label">
                            投票类型
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="type" value="0" title="图片">
                            <input type="radio" name="type" value="1" title="文字">
                            <input type="radio" name="type" value="2" title="音频">
                            <input type="radio" name="type" value="3" title="视频">
                            <input type="hidden" name="typeyuan" value="{$model['type']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs12">
                        <label class="layui-form-label">
                            验证码
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="hdyzm" value="0" title="不用">
                            <input type="radio" name="hdyzm" value="1" title="数字">
                            <input type="radio" name="hdyzm" value="2" title="文字">
                            <input type="radio" name="hdyzm" value="3" title="滑动">
                            <input type="radio" name="hdyzm" value="4" title="点击">
                            <input type="radio" name="hdyzm" value="5" title="轨迹">
                            <input type="hidden" name="hdyzmyuan" value="{$model['hdyzm']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            排序方式
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="pxfs" value="0" title="编号">
                            <input type="radio" name="pxfs" value="1" title="时间">
                            <input type="radio" name="pxfs" value="2" title="票数">
                            <input type="hidden" name="pxfsyuan" value="{$model['pxfs']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            排序顺序
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="pxsx" value="0" title="正序">
                            <input type="radio" name="pxsx" value="1" title="倒序">
                            <input type="hidden" name="pxsxyuan" value="{$model['pxsx']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            按钮文字
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="anwz" value="0" title="投票">
                            <input type="radio" name="anwz" value="1" title="助力">
                            <input type="radio" name="anwz" value="2" title="点赞">
                            <input type="hidden" name="anwzyuan" value="{$model['anwz']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            限制地域
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="diyu" value="0" title="全国">
                            <input type="radio" name="diyu" value="1" title="河北">
                            <input type="radio" name="diyu" value="2" title="邢台">
                            <input type="hidden" name="diyuyuan" value="{$model['diyu']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            头部显示
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="tbzs" value="0" title="显示">
                            <input type="radio" name="tbzs" value="1" title="不显">
                            <input type="hidden" name="tbzsyuan" value="{$model['tbzs']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            投票状态
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="state" value="0" title="正常">
                            <input type="radio" name="state" value="1" title="关闭">
                            <input type="radio" name="state" value="2" title="删除">
                            <input type="hidden" name="stateyuan" value="{$model['state']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            是否缓存
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="huancun" value="0" title="开启">
                            <input type="radio" name="huancun" value="1" title="关闭">
                            <input type="hidden" name="huancunyuan" value="{$model['huancun']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            掌上邢台
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="sfapp" value="0" title="不投">
                            <input type="radio" name="sfapp" value="1" title="投票">
                            <input type="hidden" name="sfappyuan" value="{$model['sfapp']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            排行进详情
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="phjxq" value="0" title="关闭">
                            <input type="radio" name="phjxq" value="1" title="开启">
                            <input type="hidden" name="phjxqyuan" value="{$model['phjxq']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            网页H5端
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="wyh5" value="0" title="关闭">
                            <input type="radio" name="wyh5" value="1" title="开启">
                            <input type="hidden" name="wyh5yuan" value="{$model['wyh5']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            首页音视频
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="syysp" value="0" title="关闭">
                            <input type="radio" name="syysp" value="1" title="开启">
                            <input type="hidden" name="syyspyuan" value="{$model['syysp']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            微信端
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="wxd" value="0" title="关闭">
                            <input type="radio" name="wxd" value="1" title="开启">
                            <input type="hidden" name="wxdyuan" value="{$model['wxd']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            总暂停
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="zzt" value="0" title="关闭">
                            <input type="radio" name="zzt" value="1" title="开启">
                            <input type="hidden" name="zztyuan" value="{$model['zzt']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            样式
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="ispubu" value="0" title="整齐">
                            <input type="radio" name="ispubu" value="1" title="瀑布流">
                            <input type="hidden" name="ispubuyuan" value="{$model['ispubu']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        
                    </div>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs3">
                        <label class="layui-form-label">
                            几个公众号
                        </label>
                        <div class="layui-col-sm2">
                            <input type="text" class="layui-input layui-form-danger" name="numgzh" type="text" value="{$model['numgzh']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs4">
                        <label class="layui-form-label">走登录</label>
                        <div class="layui-input-block">
                        <select name="zdlgzh" lay-verify="required">
                            <!-- <option value="xingtaiwang">邢台网</option>
                            <option value="xingtaifabu">邢台发布</option> -->
                        </select>
                        <input type="hidden" name="zdlgzhyuan" value="{$model['zdlgzh']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs4">
                        <label class="layui-form-label">关注后投票</label>
                        <div class="layui-input-block">
                            <input type="radio" name="isguanzhu" value="0" title="不用">
                            <input type="radio" name="isguanzhu" value="1" title="关注">
                            <input type="hidden" name="isguanzhuyuan" value="{$model['isguanzhu']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        选择公众号
                    </label>
                    <div class="layui-col-sm10" id="dlgzhhtml">
                        
                    </div>
                    <input type="hidden" name="dlgzhyuan" value="{$model['dlgzh']??""}"/>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        分享标题
                    </label>
                    <div class="layui-col-sm6">
                        <input type="text" class="layui-input layui-form-danger"  placeholder="分享标题" name="wxsharetitle" type="text" value="{$model['wxsharetitle']??""}"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        分享描述
                    </label>
                    <div class="layui-col-sm6">
                        <input type="text" class="layui-input layui-form-danger"  placeholder="分享描述" name="wxsharedesc" type="text" value="{$model['wxsharedesc']??""}"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        分享链接
                    </label>
                    <div class="layui-col-sm6">
                        <input type="text" class="layui-input layui-form-danger"  placeholder="分享链接" name="shareurl" type="text" value="{$model['shareurl']??""}"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        分享图片
                    </label>
                    <div class="layui-input-block">
                        {:opt_photobj("wxshareimg")}
                    <button class="pear-btn pear-btn-primary pear-btn-sm upload-image" type="button">
                        <i class="fa fa-image">
                        </i>
                        上传图片
                    </button>
                    <input name="wxshareimg" type="hidden" value="{$model['wxshareimg']??""}"/>
                    <div class="upload-image">
                        <span>
                        </span>
                        <img class="upload-image" src="{$model['wxshareimg']??""}"/>
                    </div>
                    </div>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            主色调
                        </label>
                        <div class="layui-input-block">
                            <div id="test1"></div>
                            <input type="hidden" name="zsd" value="{$model['zsd']??""}"/>
                            <input type="hidden" name="zsdyuan" value="{$model['zsd']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            按钮颜色
                        </label>
                        <div class="layui-input-block">
                            <div id="test2"></div>
                            <input type="hidden" name="anniucol" value="{$model['anniucol']??""}"/>
                            <input type="hidden" name="anniucolyuan" value="{$model['anniucol']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">音频：</label>
                        <div class="layui-input-inline">
                            <input type="text" name="audio"  id="inputaudiourl" placeholder="音频地址" value="{$model['audio']??""}" class="layui-input"> 
                        </div>
                        <button class="pear-btn pear-btn-primary pear-btn-sm upload-audio" type="button" name="upload-audio">
                            上传音频
                        </button>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            音频状态
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="sfaudio" value="0" title="关闭">
                            <input type="radio" name="sfaudio" value="1" title="开启">
                            <input type="hidden" name="sfaudioyuan" value="{$model['sfaudio']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs4">
                        <label class="layui-form-label">
                            底部导航
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="dbanwzxs" value="0" title="显示" lay-filter="dbanwzxs">
                            <input type="radio" name="dbanwzxs" value="1" title="隐藏" lay-filter="dbanwzxs">
                            <input type="hidden" name="dbanwzxsyuan" value="{$model['dbanwzxs']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs1">
                        <div class="layui-col-sm8" id="div16" style="display:block;">
                            <input type="text" name="dbwode" value="{$model['dbwode']??""}" class="layui-input"> 
                        </div>
                    </div>
                    <div class="layui-col-xs1">
                        <div class="layui-col-sm8" id="div17" style="display:block;">
                            <input type="text" name="dbpaihang" value="{$model['dbpaihang']??""}" class="layui-input"> 
                        </div>
                    </div>
                    <div class="layui-col-xs1">
                        <div class="layui-col-sm8" id="div18" style="display:block;">
                            <input type="text" name="dbguize" value="{$model['dbguize']??""}" class="layui-input"> 
                        </div>
                    </div>
                    <div class="layui-col-xs1">
                        <div class="layui-col-sm8" id="div19" style="display:block;">
                            <input type="text" name="dbbaoming" value="{$model['dbbaoming']??""}" class="layui-input"> 
                        </div>
                    </div>
                    <div class="layui-col-xs4">
                        <div class="layui-col-sm3" id="div20" style="display:block;">
                            <input type="text" name="dbzidingyi" value="{$model['dbzidingyi']??""}" class="layui-input"> 
                        </div>
                        <div class="layui-col-sm9" id="div21" style="display:block;">
                            <input type="text" name="dbzidingyiurl" value="{$model['dbzidingyiurl']??""}" class="layui-input"> 
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        顶部跑马灯
                    </label>
                    <div class="layui-col-sm6">
                        <input type="text" class="layui-input layui-form-danger"  placeholder="顶部跑马灯" name="yjhsm" type="text" value="{$model['yjhsm']??""}"/>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">底部版权</label>
                        <div class="layui-col-sm7">
                            <input type="text" name="dbbq"  placeholder="底部版权" value="{$model['dbbq']??""}"/ class="layui-input  layui-form-danger"> 
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            版权显示
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="dbbqxs" value="0" title="关闭">
                            <input type="radio" name="dbbqxs" value="1" title="显示">
                            <input type="hidden" name="dbbqxsyuan" value="{$model['dbbqxs']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            选择模板
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="moban" value="0" title="模板一">
                            <input type="radio" name="moban" value="1" title="模板二">
                            <input type="radio" name="moban" value="2" title="模板三">
                            <input type="radio" name="moban" value="3" title="模板四">
                            <input type="hidden" name="mobanyuan" value="{$model['moban']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            封面轮播
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="lunbotuxs" value="0" title="关闭" lay-filter="lunbotuxs">
                            <input type="radio" name="lunbotuxs" value="1" title="开启" lay-filter="lunbotuxs">
                            <input type="hidden" name="lunbotuxsyuan" value="{$model['lunbotuxs']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6" id="div9" style="display:none;">
                        <label class="layui-form-label">
                            轮播图一
                        </label>
                        <div class="layui-input-block">
                            {:opt_photobj("lunboimgyi")}
                        <button class="pear-btn pear-btn-primary pear-btn-sm upload-image" type="button">
                            <i class="fa fa-image">
                            </i>
                            上传图片
                        </button>
                        <input name="lunboimgyi" type="hidden" value="{$model['lunboimgyi']??""}"/>
                        <div class="upload-image">
                            <span>
                            </span>
                            <img class="upload-image" src="{$model['lunboimgyi']??""}"/>
                        </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6" id="div10" style="display:none;">
                        <label class="layui-form-label">跳转链接</label>
                        <div class="layui-input-inline">
                            <input type="text" name="lunbourlyi"  placeholder="跳转链接" value="{$model['lunbourlyi']??""}" class="layui-input"> 
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6" id="div11" style="display:none;">
                        <label class="layui-form-label">
                            轮播图二
                        </label>
                        <div class="layui-input-block">
                            {:opt_photobj("lunboimger")}
                        <button class="pear-btn pear-btn-primary pear-btn-sm upload-image" type="button">
                            <i class="fa fa-image">
                            </i>
                            上传图片
                        </button>
                        <input name="lunboimger" type="hidden" value="{$model['lunboimger']??""}"/>
                        <div class="upload-image">
                            <span>
                            </span>
                            <img class="upload-image" src="{$model['lunboimger']??""}"/>
                        </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6" id="div12" style="display:none;">
                        <label class="layui-form-label">跳转链接</label>
                        <div class="layui-input-inline">
                            <input type="text" name="lunbourler"  placeholder="跳转链接" value="{$model['lunbourler']??""}" class="layui-input"> 
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6" id="div13" style="display:none;">
                        <label class="layui-form-label">
                            轮播图三
                        </label>
                        <div class="layui-input-block">
                            {:opt_photobj("lunboimgsan")}
                        <button class="pear-btn pear-btn-primary pear-btn-sm upload-image" type="button">
                            <i class="fa fa-image">
                            </i>
                            上传图片
                        </button>
                        <input name="lunboimgsan" type="hidden" value="{$model['lunboimgsan']??""}"/>
                        <div class="upload-image">
                            <span>
                            </span>
                            <img class="upload-image" src="{$model['lunboimgsan']??""}"/>
                        </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6" id="div14" style="display:none;">
                        <label class="layui-form-label">跳转链接</label>
                        <div class="layui-input-inline">
                            <input type="text" name="lunbourlsan"  placeholder="跳转链接" value="{$model['lunbourlsan']??""}" class="layui-input"> 
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            是否报名
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="baoming" value="0" title="关闭" lay-filter="baoming">
                            <input type="radio" name="baoming" value="1" title="开启" lay-filter="baoming">
                            <input type="hidden" name="baomingyuan" value="{$model['baoming']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6" id="div3" style="display: none;">
                        <label class="layui-form-label">
                            是否审核
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="bmshenhe" value="0" title="审核">
                            <input type="radio" name="bmshenhe" value="1" title="不审">
                            <input type="hidden" name="bmshenheyuan" value="{$model['bmshenhe']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6" id="div4" style="display: none;">
                        <label class="layui-form-label">
                            开始报名
                        </label>
                        <div class="layui-col-sm5">
                            <input type="text" class="layui-input layui-form-danger" name="bmkstime" type="text"  value="{$model['bmkstime']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6" id="div5" style="display: none;">
                        <label class="layui-form-label">
                            结束报名
                        </label>
                        <div class="layui-col-sm5">
                            <input type="text" class="layui-input layui-form-danger" name="bmjstime" type="text"  value="{$model['bmjstime']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs12" id="div6" style="display: none;">
                        <label class="layui-form-label">
                            报名项
                        </label>
                        <div class="layui-input-block" id="bmxianghtml">
                            
                        </div>
                        <input type="hidden" name="bmxiangyuan" value="{$model['bmxiang']??""}"/>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6" id="div7" style="display: none;">
                        <label class="layui-form-label">
                            允许前台上传照片个数
                        </label>
                        <div class="layui-col-sm2">
                            <input type="text" class="layui-input layui-form-danger" name="bmnumimg" type="text" value="{$model['bmnumimg']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6" id="div8" style="display: none;">
                        <label class="layui-form-label">
                            图片必填
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="sfbmimg" value="0" title="不是">
                            <input type="radio" name="sfbmimg" value="1" title="必填">
                            <input type="hidden" name="sfbmimgyuan" value="{$model['sfbmimg']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6" id="div28" style="display: none;">
                        <label class="layui-form-label">
                            限制报名次数
                        </label>
                        <div class="layui-col-sm2">
                            <input type="text" class="layui-input layui-form-danger" name="bmnum" type="text" value="{$model['bmnum']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6" id="div29" style="display: none;">
                        <label class="layui-form-label">
                            报名类型
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="bmkind" value="0" title="正常报名">
                            <input type="radio" name="bmkind" value="1" title="其他报名">
                            <input type="hidden" name="bmkindyuan" value="{$model['bmkind']??""}"/>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            是否分组
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="fenzu" value="0" title="不用" lay-filter="fenzu">
                            <input type="radio" name="fenzu" value="1" title="开启" lay-filter="fenzu">
                            <input type="hidden" name="fenzuyuan" value="{$model['fenzu']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">
                            属性设置
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="shuxing" value="0" title="不用" lay-filter="shuxing">
                            <input type="radio" name="shuxing" value="1" title="开启" lay-filter="shuxing">
                            <input type="hidden" name="shuxingyuan" value="{$model['shuxing']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6" id="div22" style="display: none;">
                        <label class="layui-form-label">
                            分组名称
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="fznamexs" value="0" title="显示">
                            <input type="radio" name="fznamexs" value="1" title="隐藏">
                            <input type="hidden" name="fznamexsyuan" value="{$model['fznamexs']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs6" id="div23" style="display: none;">
                        <label class="layui-form-label">
                            总分组名称
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="zfznamexs" value="0" title="显示">
                            <input type="radio" name="zfznamexs" value="1" title="隐藏">
                            <input type="hidden" name="zfznamexsyuan" value="{$model['zfznamexs']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs6" id="div24" style="display: none;">
                        <label class="layui-form-label">
                            分组名称(已"/"区分)
                        </label>
                        <div class="layui-col-sm8">
                            <input type="text" class="layui-input layui-form-danger" name="fenzuname" type="text" placeholder="第一组名称/第二组名称/第三组名称" value="{$model['fenzuname']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs3" id="div25" style="display: none;">
                        <label class="layui-form-label">
                            每组限票
                        </label>
                        <div class="layui-col-sm3">
                            <input type="text" class="layui-input layui-form-danger" name="fenzupiao" type="text" value="{$model['fenzupiao']??""}"/>
                        </div>
                    </div>
                    <div class="layui-col-xs3" id="div26" style="display: none;">
                        <label class="layui-form-label">一行几个</label>
                        <div class="layui-input-block">
                          <select name="yihangjige" lay-verify="required">
                            <option value="1">1</option>
                            <option value="2">2</option>
                          </select>
                          <input type="hidden" name="yihangjigeyuan" value="{$model['yihangjige']??""}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-bottom: 15px;">
                    <div class="layui-col-xs12" id="div27" style="display: none;">
                        <label class="layui-form-label">
                            选择属性
                        </label>
                        <div class="layui-input-block" id="shuxingzhihtml">
                            <!-- <input type="checkbox" name="shuxingzhi" value="11" title="姓名">
                            <input type="checkbox" name="shuxingzhi" value="12" title="性别"> -->
                        </div>
                        <input type="hidden" name="shuxingzhiyuan" value="{$model['shuxingzhi']??""}"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="bottom" style="position:relative;">
            <div class="button-container">
                <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="" lay-filter="save">
                    <i class="layui-icon layui-icon-ok"></i>
                    提交
                </button>
            </div>
        </div>
    </div>
</form>
<script>
    layui.use(['form', 'jquery', 'layedit', 'tinymce', 'uploads','upload', 'laydate', 'colorpicker'], function () {
        let form = layui.form;
        let $ = layui.jquery;
        let layedit = layui.layedit;
        let tinymce = layui.tinymce;
        var laydate = layui.laydate;
        var colorpicker = layui.colorpicker;

        var upload = layui.upload;
        var leftUrl = window.location.pathname.split("/")[1];
        if(leftUrl.indexOf(".php")>0){
            var leftUrl = '/'+ leftUrl;
        }else{
            var leftUrl = '';
        }
        upload.render({
            elem: "[name='upload-audio']",
            url: leftUrl + '/index/uploadyinpin',
            accept: 'audio',
            done: function (res) {
                layer.msg('上传成功');
                // console.log(res.data.src);
                $('#inputaudiourl').val(res.data.src);
            }
        });

        $.ajax({
            url:'http://newuc.xtxcm.com/api/uc/wxlist',
            data:{},
            dataType: 'json',
            type: 'GET',
            success: function(res) {
                $.ajax({
                    url:'{$Request.root}/admin.zavote/zhengzhpz',
                    data:{id:res.data},
                    dataType: 'json',
                    type: 'POST',
                    success: function(res) {

                    }
                });
                // console.log(res.data);
                var htmla = '';
                for (var j = 0; j < res.data.length; j++) {
                    htmla += "<option value=" +res.data[j]['appid'] + ">" +res.data[j]['appname'] + "</option>";
                }
                $("[name='zdlgzh']").append(htmla);
                form.render();
                var zdlgzhyuan = $("[name='zdlgzhyuan']").val();
                $("[name='zdlgzh']").find("option[value="+zdlgzhyuan+"]").attr("selected",true);
                form.render('select') //再次渲染

                var html = '';
                for (var j = 0; j < res.data.length; j++) {
                    html += "<input type='checkbox' name='dlgzh' value=" +res.data[j]['appid'] + " title=" +res.data[j]['appname'] + "><div class='layui-unselect layui-form-checkbox'><span>" +res.data[j]['appname'] + "</span><i class='layui-icon layui-icon-ok'></i></div>";
                }
                $("#dlgzhhtml").append(html);
                form.render();
                var dlgzhyuan = $("[name='dlgzhyuan']").val();
                var levelType = dlgzhyuan.split(",");
                for(var j=0;j<levelType.length;j++){
                    var levelTypeCheckbox=$("input[name='dlgzh']");
                    for(var i=0;i<levelTypeCheckbox.length;i++){
                        if(levelTypeCheckbox[i].value==levelType[j]){
                            levelTypeCheckbox[i].value=levelType[j];
                            levelTypeCheckbox[i].checked=true;
                        }
                    }
                    form.render();
                }
            }
        });
 

        
        var yihangjigeyuan = $("[name='yihangjigeyuan']").val();
        $("[name='yihangjige']").find("option[value="+yihangjigeyuan+"]").attr("selected",true);
        form.render('select') //再次渲染

        $.ajax({
            url:'{$Request.root}/admin.zavote/shuxing',
            data:{},
            dataType: 'json',
            type: 'POST',
            success: function(res) {
                // console.log(res);
                var html = '';
                for (var j = 0; j < res.shuxingnum; j++) {
                    html += "<input type='checkbox' name='shuxingzhi' value=" +res.shuxing[j].id + " title=" +res.shuxing[j].wxgzgname + "><div class='layui-unselect layui-form-checkbox'><span>" +res.shuxing[j].wxgzgname + "</span><i class='layui-icon layui-icon-ok'></i></div>";
                }
                $("#shuxingzhihtml").append(html);
                form.render();
                var shuxingzhiyuan = $("[name='shuxingzhiyuan']").val();
                var levelType = shuxingzhiyuan.split(",");
                for(var j=0;j<levelType.length;j++){
                    var levelTypeCheckbox=$("input[name='shuxingzhi']");
                    for(var i=0;i<levelTypeCheckbox.length;i++){
                        if(levelTypeCheckbox[i].value==levelType[j]){
                            levelTypeCheckbox[i].value=levelType[j];
                            levelTypeCheckbox[i].checked=true;
                        }
                    }
                    form.render();
                }

                var htmla = '';
                for (var j = 0; j < res.shuxingnum; j++) {
                    htmla += "<input type='checkbox' name='bmxiang' value=" +res.shuxing[j].id + " title=" +res.shuxing[j].wxgzgname + "><div class='layui-unselect layui-form-checkbox'><span>" +res.shuxing[j].wxgzgname + "</span><i class='layui-icon layui-icon-ok'></i></div>";
                }
                $("#bmxianghtml").append(htmla);
                form.render();
                var bmxiangyuan = $("[name='bmxiangyuan']").val();
                var levelType = bmxiangyuan.split(",");
                for(var j=0;j<levelType.length;j++){
                    var levelTypeCheckbox=$("input[name='bmxiang']");
                    for(var i=0;i<levelTypeCheckbox.length;i++){
                        if(levelTypeCheckbox[i].value==levelType[j]){
                            levelTypeCheckbox[i].value=levelType[j];
                            levelTypeCheckbox[i].checked=true;
                        }
                    }
                    form.render();
                }
            }
        });

        var danxuanyuan = $("[name='danxuanyuan']").val();
        $('input[name="danxuan"][value='+danxuanyuan+']').prop('checked','checked');
        var cishuyuan = $("[name='cishuyuan']").val();
        $('input[name="cishu"][value='+cishuyuan+']').prop('checked','checked');
        var typeyuan = $("[name='typeyuan']").val();
        $('input[name="type"][value='+typeyuan+']').prop('checked','checked');
        var hdyzmyuan = $("[name='hdyzmyuan']").val();
        $('input[name="hdyzm"][value='+hdyzmyuan+']').prop('checked','checked');
        var pxfsyuan = $("[name='pxfsyuan']").val();
        $('input[name="pxfs"][value='+pxfsyuan+']').prop('checked','checked');
        var pxsxyuan = $("[name='pxsxyuan']").val();
        $('input[name="pxsx"][value='+pxsxyuan+']').prop('checked','checked');
        var anwzyuan = $("[name='anwzyuan']").val();
        $('input[name="anwz"][value='+anwzyuan+']').prop('checked','checked');
        var diyuyuan = $("[name='diyuyuan']").val();
        $('input[name="diyu"][value='+diyuyuan+']').prop('checked','checked');
        var tbzsyuan = $("[name='tbzsyuan']").val();
        $('input[name="tbzs"][value='+tbzsyuan+']').prop('checked','checked');
        var stateyuan = $("[name='stateyuan']").val();
        $('input[name="state"][value='+stateyuan+']').prop('checked','checked');
        var huancunyuan = $("[name='huancunyuan']").val();
        $('input[name="huancun"][value='+huancunyuan+']').prop('checked','checked');
        var sfappyuan = $("[name='sfappyuan']").val();
        $('input[name="sfapp"][value='+sfappyuan+']').prop('checked','checked');
        var phjxqyuan = $("[name='phjxqyuan']").val();
        $('input[name="phjxq"][value='+phjxqyuan+']').prop('checked','checked');
        var wyh5yuan = $("[name='wyh5yuan']").val();
        $('input[name="wyh5"][value='+wyh5yuan+']').prop('checked','checked');
        var syyspyuan = $("[name='syyspyuan']").val();
        $('input[name="syysp"][value='+syyspyuan+']').prop('checked','checked');
        var wxdyuan = $("[name='wxdyuan']").val();
        $('input[name="wxd"][value='+wxdyuan+']').prop('checked','checked');
        var zztyuan = $("[name='zztyuan']").val();
        $('input[name="zzt"][value='+zztyuan+']').prop('checked','checked');
        var ispubuyuan = $("[name='ispubuyuan']").val();
        $('input[name="ispubu"][value='+ispubuyuan+']').prop('checked','checked');
        var isguanzhuyuan = $("[name='isguanzhuyuan']").val();
        $('input[name="isguanzhu"][value='+isguanzhuyuan+']').prop('checked','checked');
        var sfaudioyuan = $("[name='sfaudioyuan']").val();
        $('input[name="sfaudio"][value='+sfaudioyuan+']').prop('checked','checked');
        var dbanwzxsyuan = $("[name='dbanwzxsyuan']").val();
        $('input[name="dbanwzxs"][value='+dbanwzxsyuan+']').prop('checked','checked');
        var dbbqxsyuan = $("[name='dbbqxsyuan']").val();
        $('input[name="dbbqxs"][value='+dbbqxsyuan+']').prop('checked','checked');
        var mobanyuan = $("[name='mobanyuan']").val();
        $('input[name="moban"][value='+mobanyuan+']').prop('checked','checked');
        var lunbotuxsyuan = $("[name='lunbotuxsyuan']").val();
        $('input[name="lunbotuxs"][value='+lunbotuxsyuan+']').prop('checked','checked');
        var baomingyuan = $("[name='baomingyuan']").val();
        $('input[name="baoming"][value='+baomingyuan+']').prop('checked','checked');
        var bmshenheyuan = $("[name='bmshenheyuan']").val();
        $('input[name="bmshenhe"][value='+bmshenheyuan+']').prop('checked','checked');
        var sfbmimgyuan = $("[name='sfbmimgyuan']").val();
        $('input[name="sfbmimg"][value='+sfbmimgyuan+']').prop('checked','checked');
        var bmkindyuan = $("[name='bmkindyuan']").val();
        $('input[name="bmkind"][value='+bmkindyuan+']').prop('checked','checked');
        var fenzuyuan = $("[name='fenzuyuan']").val();
        $('input[name="fenzu"][value='+fenzuyuan+']').prop('checked','checked');
        var shuxingyuan = $("[name='shuxingyuan']").val();
        $('input[name="shuxing"][value='+shuxingyuan+']').prop('checked','checked');
        var fznamexsyuan = $("[name='fznamexsyuan']").val();
        $('input[name="fznamexs"][value='+fznamexsyuan+']').prop('checked','checked');
        var zfznamexsyuan = $("[name='zfznamexsyuan']").val();
        $('input[name="zfznamexs"][value='+zfznamexsyuan+']').prop('checked','checked');
        form.render('radio');

        if(danxuanyuan == "0"){
            $("#div1").css("display","none");
            $("#div2").css("display","none");
            $("#div15").css("display","block");
        } else if(danxuanyuan == "1") {
            $("#div1").css("display","block");
            $("#div2").css("display","block");
            $("#div15").css("display","none");
        }

        if(baomingyuan == "0"){
            $("#div3").css("display","none");
            $("#div4").css("display","none");
            $("#div5").css("display","none");
            $("#div6").css("display","none");
            $("#div7").css("display","none");
            $("#div28").css("display","none");
            $("#div8").css("display","none");
            $("#div29").css("display","none");
        } else if(baomingyuan == "1") {
            $("#div3").css("display","block");
            $("#div4").css("display","block");
            $("#div5").css("display","block");
            $("#div6").css("display","block");
            $("#div7").css("display","block");
            $("#div28").css("display","block");
            $("#div8").css("display","block");
            $("#div29").css("display","block");
        }

        if(lunbotuxsyuan == "0"){
            $("#div9").css("display","none");
            $("#div10").css("display","none");
            $("#div11").css("display","none");
            $("#div12").css("display","none");
            $("#div13").css("display","none");
            $("#div14").css("display","none");
        } else if(lunbotuxsyuan == "1") {
            $("#div9").css("display","block");
            $("#div10").css("display","block");
            $("#div11").css("display","block");
            $("#div12").css("display","block");
            $("#div13").css("display","block");
            $("#div14").css("display","block");
        }

        if(dbanwzxsyuan == "1"){
            $("#div16").css("display","none");
            $("#div17").css("display","none");
            $("#div18").css("display","none");
            $("#div19").css("display","none");
            $("#div20").css("display","none");
            $("#div21").css("display","none");
        } else if(dbanwzxsyuan == "0") {
            $("#div16").css("display","block");
            $("#div17").css("display","block");
            $("#div18").css("display","block");
            $("#div19").css("display","block");
            $("#div20").css("display","block");
            $("#div21").css("display","block");
        }

        if(fenzuyuan == "0"){
            $("#div22").css("display","none");
            $("#div23").css("display","none");
            $("#div24").css("display","none");
            $("#div25").css("display","none");
            $("#div26").css("display","none");
        } else if(fenzuyuan == "1") {
            $("#div22").css("display","block");
            $("#div23").css("display","block");
            $("#div24").css("display","block");
            $("#div25").css("display","block");
            $("#div26").css("display","block");
        }

        if(shuxingyuan == "0"){
            $("#div27").css("display","none");
        } else if(shuxingyuan == "1") {
            $("#div27").css("display","block");
        }

        form.on('radio(danxuan)',function(data){
            if(data.value == "0"){
                $("#div1").css("display","none");
                $("#div2").css("display","none");
                $("#div15").css("display","block");
            } else if(data.value == "1") {
                $("#div1").css("display","block");
                $("#div2").css("display","block");
                $("#div15").css("display","none");
            }
        })

        form.on('radio(baoming)',function(data){
            if(data.value == "0"){
                $("#div3").css("display","none");
                $("#div4").css("display","none");
                $("#div5").css("display","none");
                $("#div6").css("display","none");
                $("#div7").css("display","none");
                $("#div28").css("display","none");
                $("#div8").css("display","none");
                $("#div29").css("display","none");
            } else if(data.value == "1") {
                $("#div3").css("display","block");
                $("#div4").css("display","block");
                $("#div5").css("display","block");
                $("#div6").css("display","block");
                $("#div7").css("display","block");
                $("#div28").css("display","block");
                $("#div8").css("display","block");
                $("#div29").css("display","block");
            }
        })

        form.on('radio(lunbotuxs)',function(data){
            if(data.value == "0"){
                $("#div9").css("display","none");
                $("#div10").css("display","none");
                $("#div11").css("display","none");
                $("#div12").css("display","none");
                $("#div13").css("display","none");
                $("#div14").css("display","none");
            } else if(data.value == "1") {
                $("#div9").css("display","block");
                $("#div10").css("display","block");
                $("#div11").css("display","block");
                $("#div12").css("display","block");
                $("#div13").css("display","block");
                $("#div14").css("display","block");
            }
        })

        form.on('radio(dbanwzxs)',function(data){
            if(data.value == "1"){
                $("#div16").css("display","none");
                $("#div17").css("display","none");
                $("#div18").css("display","none");
                $("#div19").css("display","none");
                $("#div20").css("display","none");
                $("#div21").css("display","none");
            } else if(data.value == "0") {
                $("#div16").css("display","block");
                $("#div17").css("display","block");
                $("#div18").css("display","block");
                $("#div19").css("display","block");
                $("#div20").css("display","block");
                $("#div21").css("display","block");
            }
        })

        form.on('radio(fenzu)',function(data){
            if(data.value == "0"){
                $("#div22").css("display","none");
                $("#div23").css("display","none");
                $("#div24").css("display","none");
                $("#div25").css("display","none");
                $("#div26").css("display","none");
            } else if(data.value == "1") {
                $("#div22").css("display","block");
                $("#div23").css("display","block");
                $("#div24").css("display","block");
                $("#div25").css("display","block");
                $("#div26").css("display","block");
            }
        })

        form.on('radio(shuxing)',function(data){
            if(data.value == "0"){
                $("#div27").css("display","none");
            } else if(data.value == "1") {
                $("#div27").css("display","block");
            }
        })

        var zsdyuan = $("[name='zsdyuan']").val();
        //常规使用
        colorpicker.render({
            elem: '#test1' //绑定元素
            ,color:zsdyuan
            ,change: function(color){ //颜色改变的回调
                $("[name='zsd']").val(color);
            }
        });

        var anniucolyuan = $("[name='anniucolyuan']").val();
        //常规使用
        colorpicker.render({
            elem: '#test2' //绑定元素
            ,color:anniucolyuan
            ,change: function(color){ //颜色改变的回调
                $("[name='anniucol']").val(color);
            }
        });

        //日期时间选择器
        laydate.render({
            elem: "[name='begintime']",
            type: 'datetime'
            ,done: function(value, date, endDate){
                // console.log(value); //得到日期生成的值，如：2017-08-18
                // $("[name='toutime']").val(value);
            }
        });

        //日期时间选择器
        laydate.render({
            elem: "[name='stoptime']",
            type: 'datetime'
            ,done: function(value, date, endDate){
                // console.log(value); //得到日期生成的值，如：2017-08-18
                // $("[name='notoutime']").val(value);
            }
        });

        //日期时间选择器
        laydate.render({
            elem: "[name='toutime']",
            type: 'time',
            // value: '00:00:00', //必须遵循format参数设定的格式
            done: function(value, date, endDate){
            }
        });

        //日期时间选择器
        laydate.render({
            elem: "[name='notoutime']",
            type: 'time',
            // value: '23:59:59', //必须遵循format参数设定的格式
            done: function(value, date, endDate){
            }
        });

        //日期时间选择器
        laydate.render({
            elem: "[name='bmkstime'],[name='bmjstime']",
            type: 'datetime'
            ,done: function(value, date, endDate){
                // console.log(value); //得到日期生成的值，如：2017-08-18
            }
        });

        layedit.set({
            uploadImage: {
                url: "{$Request.root}/index/upload"
            }
        });

        //建立编辑器
        var content  = tinymce.render({ elem: "#content",height: 350,inline:false,placeholder:"在此输入正文",
        relative_urls: false,remove_script_host: false,
        auto_focus: true,toolbar_mode : "floating",toolbar_sticky: false,quickbars_insert_toolbar:"",images_upload_url:"{$Request.root}/index/upload",image_advtab: true,menubar:true});

        form.on('submit(save)', function (data) {
            //将页面全部复选框选中的值拼接到一个数组中
            var arr_box = [];
            $('input[name=shuxingzhi]:checked').each(function() {
                arr_box.push($(this).val());
            });
            var shuxingzhi = arr_box.toString()
            data.field.shuxingzhi=shuxingzhi;


            //将页面全部复选框选中的值拼接到一个数组中
            var arr_boxa = [];
            $('input[name=bmxiang]:checked').each(function() {
                arr_boxa.push($(this).val());
            });
            var bmxiang = arr_boxa.toString()
            data.field.bmxiang=bmxiang;
            
            
            //将页面全部复选框选中的值拼接到一个数组中
            var arr_boxa1 = [];
            $('input[name=dlgzh]:checked').each(function() {
                arr_boxa1.push($(this).val());
            });
            var dlgzh = arr_boxa1.toString()
            data.field.dlgzh=dlgzh;


            // console.log(shuxingzhi);
            // return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。

            data.field.content=content.getContent();
            $.ajax({
                data: JSON.stringify(data.field),
                dataType: 'json',
                contentType: 'application/json',
                type: 'post',
                success: function (res) {
                    //判断有没有权限
                    if (res && res.code == 999) {
                        layer.msg(res.msg, {
                            icon: 5,
                            time: 2000,
                        })
                        return false;
                    } else if (res.code == 200) {
                        layer.msg(res.msg,{icon:1,time:1000}, function () {
                            parent.layer.close(parent.layer.getFrameIndex(window.name));//关闭当前页
                            parent.layui.table.reload("dataTable");
                        });
                    } else {
                        layer.msg(res.msg,{icon:2,time:1000});
                    }
                }
            })
            return false;
        });
    })
</script>
</body>
</html>